package com.smbms.exception;

import com.smbms.util.Result;
import com.smbms.util.StatusCode;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyException {


    @ExceptionHandler
    public Result doException(Exception e){
        return new Result(false, StatusCode.ERROR,e.getMessage());
    }
}
